<?php
namespace app\admin\controller;

use app\common\AdminController;
use app\admin\model\WorkerDepartment as WDM;
use app\admin\validate\DepartValidate;

class Depart extends AdminController
{
    protected $validate = DepartValidate::class;

    protected $model = WDM::class;

    /**
     * [index 部门管理]
     * @return [type] [description]
     */
    public function index()
    {
        return view();
    }

    /**
     * [save 新增或者编辑部门]
     * @return [type] [description]
     */
    public function save()
    {
        $id = $this->request->param('id', 0, 'intval');
        return view('',[
            'system_menus' => list_system_menu(),
            'detail' => WDM::find($id)
        ]);
    }
}
